package com.train.mgr.modules.biz.dto.request;

import com.train.mgr.modules.system.dto.request.groups.Insert;
import com.train.mgr.modules.system.dto.request.groups.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class CourseReqDTO {

    @ApiModelProperty(name = "id", value = "id编辑时必填",required = true)
    @NotNull(message = "主键ID必填", groups = {Update.class})
    private Long id;

    @ApiModelProperty(name = "courseName", value = "课程名称，新增/编辑时必填",required = true)
    @NotBlank(message = "课程名称必填", groups = {Insert.class, Update.class})
    @Length(max = 20, message = "课程名称必须在{max}个字以内", groups = {Insert.class, Update.class})
    private String courseName;

    private String courseIntroduction;

    private String deadline;
}
